package com.bwie.config;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @TableName park
 */
@Data
@Document(indexName = "parkinfo_0904", replicas = 1, shards = 1)
public class ParkInfo implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    @Id
    private Integer id;

    /**
     * 所属体育场
     */
    @Field(type = FieldType.Keyword)
    private String sports;

    /**
     * 名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String name;

    /**
     * 踢球人数
     */
    @Field(type = FieldType.Integer)
    private Integer number;

    /**
     * 排序号
     */
    @Field(type = FieldType.Keyword)
    private String sort;

    /**
     * 价格
     */
    @Field(type = FieldType.Double)
    private double price;

    /**
     * 折扣价格
     */
    @Field(type = FieldType.Double)
    private double discount;

    /**
     * 球场介绍
     */
    @Field(type = FieldType.Integer)
    private Integer introduceId;


    @TableField(exist = false)
    private String introduceName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}